import request from '@/utils/request'

// 获取
export const getDepartments = () => request.get('/company/department')

// 删除
export const delDepartment = id => request.delete(`/company/department/${id}`)

// 新增
export const addDepartment = data => request.post('/company/department', data)

// 更新
export const updateDepartment = data => request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
})